package com.rongke.model;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.rongke.utils.DateJsonDeserializer;
import com.rongke.utils.DateJsonSerializer;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 评价响应
 */
public class CommentResponse implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 评价id
     */
    private Long id;

    /**
     * 商品id
     */
    private Long goodsId;

    /**
     * 用户id
     */
    private Long muserId;

    /**
     * 用户姓名
     */
    private String userName;

    /**
     * 用户头像
     */
    private String avatarUrl;

    /**
     *会员等级 会员等级(初始 V1 消费总额20000 V2，50000 V3，100000 V4,200000 V5）
     */
    private Integer memberLevel;

    /**
     * 是否匿名 0 不匿名 1 匿名
     */
    private Integer isAnonymous;

    /**
     * 评价内容
     */
    private String content;

    /**
     * 评价图片，逗号分隔字符串
     */
    private String commentPic;

    /**
     * 评价时间
     */
    @JsonSerialize(using=DateJsonSerializer.class)
    @JsonDeserialize(using=DateJsonDeserializer.class)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss" )
    private Date gmtDatetime;


    public CommentResponse() {
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(Long goodsId) {
        this.goodsId = goodsId;
    }

    public Long getMuserId() {
        return muserId;
    }

    public void setMuserId(Long muserId) {
        this.muserId = muserId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getAvatarUrl() {
        return avatarUrl;
    }

    public void setAvatarUrl(String avatarUrl) {
        this.avatarUrl = avatarUrl;
    }

    public Integer getMemberLevel() {
        return memberLevel;
    }

    public void setMemberLevel(Integer memberLevel) {
        this.memberLevel = memberLevel;
    }

    public Integer getIsAnonymous() {
        return isAnonymous;
    }

    public void setIsAnonymous(Integer isAnonymous) {
        this.isAnonymous = isAnonymous;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getCommentPic() {
        return commentPic;
    }

    public void setCommentPic(String commentPic) {
        this.commentPic = commentPic;
    }

    public Date getGmtDatetime() {
        return gmtDatetime;
    }

    public void setGmtDatetime(Date gmtDatetime) {
        this.gmtDatetime = gmtDatetime;
    }
}
